﻿<Window xmlns:Views="clr-namespace:MyHome.Configuration.Views" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ViewModel="clr-namespace:MyHome.Configuration.ViewModel" x:Class="MyHome.Configuration.MainWindow"
        Title="MainWindow" Height="768" Width="1200" KeyUp="Window_KeyUp">
    <Window.DataContext>
        <ViewModel:MainViewModel/>
    </Window.DataContext>
    <Grid DataContext="{Binding PluginHost}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition/>
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <StackPanel Margin="5,10,5,5">
            <Button Margin="5" Content="Reload plugins from database" Command="{Binding LoadPluginsCommand, Mode=OneWay}"/>
            <Button Margin="5" Content="Update information from server" Command="{Binding UpdateCommand, Mode=OneWay}"/>
            <Button Margin="5" Content="Save changes to server" Command="{Binding SavePluginsCommand, Mode=OneWay}"/>
            <Button Margin="5" Content="Start all plugins" Command="{Binding StartPluginsCommand, Mode=OneWay}"/>
            <Button Margin="5" Content="Stop all plugins" Command="{Binding StopPluginsCommand, Mode=OneWay}"/>
        </StackPanel>
        <Views:PluginGraphView Grid.Column="1"/>
        <Views:ConfigurationPaneView Grid.Column="3" DataContext="{Binding SelectedPlugin}"/>
        <Views:PluginTypesView VerticalAlignment="Bottom" Height="500"/>



    </Grid>
</Window>
